package com.tedu.weibo.result;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 枚举类：定义每一种状态码
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum StatusCode {
    //枚举须在在上面定义
    USERNAME_ERROR(1000,"用户名错误"),
    PASSWORD_ERROR(1001,"密码错误"),
    USERNAME_EXISTS(1002,"用户名被占用"),
    NOT_LOGIN(1003,"未登录"),
    NAME_OR_PASSWORD_ISNULL(1004,"用户名或密码为空"),
    OPERATION_SUCCESS(2001,"操作成功"),
    OPERATION_FAILED(2002,"操作失败"),
    UNKNOWN_ERROR(2003,"未知错误"),
    VALIDATE_ERROR(3000,"验证失败");
    private Integer statusCode;
    private String message;//每个枚举类型包含状态代码和对应的描述信息


}
